/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package mysweethome.entities;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 *
 * @author BKC
 */
@Embeddable
public class FollowPK implements Serializable {
    @Basic(optional = false)
    @Column(name = "PropertyInfoID")
    private int propertyInfoID;
    @Basic(optional = false)
    @Column(name = "CustomerID")
    private int customerID;

    public FollowPK() {
    }

    public FollowPK(int propertyInfoID, int customerID) {
        this.propertyInfoID = propertyInfoID;
        this.customerID = customerID;
    }

    public int getPropertyInfoID() {
        return propertyInfoID;
    }

    public void setPropertyInfoID(int propertyInfoID) {
        this.propertyInfoID = propertyInfoID;
    }

    public int getCustomerID() {
        return customerID;
    }

    public void setCustomerID(int customerID) {
        this.customerID = customerID;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (int) propertyInfoID;
        hash += (int) customerID;
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof FollowPK)) {
            return false;
        }
        FollowPK other = (FollowPK) object;
        if (this.propertyInfoID != other.propertyInfoID) {
            return false;
        }
        if (this.customerID != other.customerID) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "mysweethome.entities.FollowPK[propertyInfoID=" + propertyInfoID + ", customerID=" + customerID + "]";
    }

}
